import { app } from "electron";
// import { dir } from "albert.gao/node";
// import Path from "path";

export function runServer() {
  // app.isPackaged && import("../../dist/vue/server/index.mjs");
  app.isPackaged && require("../../dist/vue/server/index.js");
  // try {
  //   let serverPath = dir([
  //     "resources/app.asar.unpacked/dist/vue/server/index.mjs",
  //     "file",
  //   ]);
  //   serverPath = Path.relative(__dirname, serverPath);
  //   /** 如果程序已经打包，则自己运行服务器, 否则由nuxt dev运行 */
  //   app.isPackaged && import(serverPath); //
  // } catch (error) {
  //   console.error(error);
  //   import("../../dist/vue/server/index.mjs");
  // }
}
